package annotation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

@Component("ht")
public class Hotel {
//	@Autowired
//	@Qualifier("wt")
	private Waiter wt;

	@Autowired
	public void setWt(
			@Qualifier("wt") Waiter wt) {
		System.out.println("setWt()");
		this.wt = wt;
	}
	
	public Hotel() {
		System.out.println("Hotel()");
	}

	@Override
	public String toString() {
		return "Hotel [wt=" + wt + "]";
	}
	
}
